package cn.usian.client;

import cn.usian.common.R;
import cn.usian.entity.Category;
import cn.usian.entity.Employee;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class CategoryClientFallbackFactory implements FallbackFactory<CategoryClient> {
    @Override
    public CategoryClient create(Throwable throwable) {
        return new CategoryClient() {
            @Override
            public R findPage(int page, int pageSize) {
                log.error("查询用户异常", throwable);
                return new R();
            }

            @Override
            public R save(Category category) {
                log.error("添加分类异常", throwable);
                return new R();
            }
        };
    }
}
